<form id="EditCustomer" method="post" action="" novalidate="novalidate" class="basic-grey">
    <div class="row">
        <div class="col-lg-10 col-md-10">
            <div class="form-group">
                <label>姓名 :</label>
                <input class="form-control" id="realName" type="text" name="realName"  style="width: 160px;"/>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-10 col-md-10">
            <div class="form-group">
                <label>部门 :</label>
                <select class="form-control" id="deptId" name="deptId"    style="width: 160px;">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-10 col-md-10">
            <div class="form-group">
                <label>电话 :</label>
                <input class="form-control" id="mobile" type="text" name="mobile"   style="width: 160px;"/>
            </div>
        </div>
    </div>
    <div class="row">
    <div class="col-lg-10 col-md-10">
        <div class="form-group">
            <label>邮箱 :</label>
            <input class="form-control" id="email" type="text" name="email"   style="width: 160px;" />
        </div>
    </div>
</div>
    <div class="row">
        <div class="col-lg-10 col-md-10">
            <div class="form-group">
                <label>状态 :</label>
                <select class="form-control" id="status" name="status"    style="width: 160px;">
                    <option value="">状态</option>
                    <option value="0">停用</option>
                    <option value="1">启用</option>
                </select>
            </div>
        </div>
    </div>

    <input type="hidden" name="head_pic">
    <input type="hidden" name="userId" id="userId">
    <input type="hidden" name="id" id="id">
</form>
<script>
    $(function () {
        getDeptdata();
    })
    ////请求部门列表
    function getDeptdata() {
        var json = {
            url: GLOBAL.URL + "/sys/dept/list",
            type: 'get',
            successfn: function(data) {
                setDeptoption(data.page.list);
            },
            errorfn: function() {
                //ajaxUpdataTable();
                //$.ligerDialog.warn("系统繁忙，请稍候再试");
            }
        };
        ajaxdata(json);

    }
    ////加载列表数据
    function setDeptoption(data) {
        var listStr='<option value="">所属部门</option>';
        if(data !=null) {
            for(var i = 0; i < data.length; i++) {
                listStr+='<option value="'+data[i].deptId+'">'+data[i].name+'</option>' ;
            }
        }
        $("#deptId").html(listStr);
    }
</script>